class Sweetpotato:
    def __init__(self):
        self.cookedstring = "生"
        self.cookedlevel = 0
        self.dongxi = []
    def __str__(self):
        return "di guan de zhuang tai %s(%d),添加的东西是%s"%(self.cookedstring,self.cookedlevel,str(self.dongxi))

    def cook(self,cooked_time):
        self.cookedlevel = cooked_time+self.cookedlevel
        if self.cookedlevel >= 0 and self.cookedlevel <=3:
            self.cookedstring = "sheng"
        elif self.cookedlevel > 3 and self.cookedlevel <= 7:
            self.cookedstring="banshu"
        elif self.cookedlevel > 7 and self.cookedlevel < 10:
            self.cookedstring = "shule"
        elif self.cookedlevel > 10:
            self.cookedstring = "guole"


    def zhuliao(self,item):
        self.dongxi.append(item)



di_gua = Sweetpotato()
print(di_gua)
di_gua.cook(1)
di_gua.zhuliao("哇哈哈")
print(di_gua)
di_gua.cook(1)
print(di_gua)
di_gua.cook(1)
print(di_gua)
di_gua.cook(1)
di_gua.zhuliao("自然")
print(di_gua)
di_gua.cook(1)
print(di_gua)
di_gua.cook(1)
print(di_gua)


